#pragma once

#ifndef _USRDLL
	#pragma comment(lib, "InputHook.lib")
	#define COSHIP_EXT_CLASS	__declspec(dllimport)
#else
	#define COSHIP_EXT_CLASS	__declspec(dllexport)
#endif

enum INPUT_TYPE
{
	UNKNOWN_INPUT = 0,
	MOUSE_INPUT,
	KEYBOARD_INPUT
};

typedef LRESULT (*INPUTEVENTPROC)(INPUT_TYPE InputType, DWORD dwProcessID, int nCode, WPARAM wParam, LPARAM lParam);

class COSHIP_EXT_CLASS CInputHook  
{
private:
	static CWnd *m_pHookWnd;
	static HWND m_hWnd;
	static LONG m_lLockCount;
	static INPUTEVENTPROC m_pInputEventProc;
	static LRESULT CALLBACK WindowProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam);
	static WNDPROC m_pOldWndProc;
	static LRESULT InputProc(INPUT_TYPE InputType, int nCode, WPARAM wParam, LPARAM lParam); 
	//static HHOOK m_hHookKeyboard;
	//static HHOOK m_hHookMouse;
	//static LRESULT CALLBACK KeyboardProc(int code, WPARAM wParam, LPARAM lParam);
	//static LRESULT CALLBACK MouseProc(int code, WPARAM wParam, LPARAM lParam);
public:
	static BOOL Start(INPUTEVENTPROC pProc, HWND hWnd, DWORD dwThreadId = 0);
	static void Stop();
};
